#include "widget.h"
#include "ui_widget.h"


Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(ui->pushButton,&QPushButton::clicked,this ,&QWidget::close);
    ui->pushButton->move(0,0);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::hander()
{   if(ui->pushButton->text()=="hello")
    ui->pushButton->setText("hello qt");
    else
     ui->pushButton->setText("hello");
}


